package cn.chengpengper.im.platform.common.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
/*@formatter:off*/

/**
 * ____________________
 * < 神兽护体，永无bug! >
 * --------------------
 *
 * @author huchengpeng
 * @version v1.0.0
 * @date 2024/11/23 16:43
 * @description 用户注册DTO
 */

/*@formatter:on*/

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户注册DTO")
public class RegisterDto implements Serializable {

    private static final long serialVersionUID = 7616771169203469837L;

    @Length(max = 64, message = "用户名不可大于64字符")
    @NotEmpty(message = "用户名不可为空")
    @ApiModelProperty(value = "用户名")
    private String userName;

    @Length(min = 5, max = 20, message = "密码长度必须在5-20个字符之间")
    @NotEmpty(message = "用户密码不可为空")
    @ApiModelProperty(value = "用户密码")
    private String password;

    @Length(max = 64, message = "昵称长度不可大于64字符")
    @NotEmpty(message = "用户昵称不可为空")
    @ApiModelProperty(value = "用户昵称")
    private String nickName;
}
